<?php
include '../../include/config.php';
include 'view/all.php';
/*
 * This is header image and images of all pages.
 */
/*
 * buyer image
 */
$buyer = mysql_query("select * from salus_user_profile_detail where FK_fa_user_id='" . $_COOKIE['gid'] . "' ") or die(mysql_error());
while ($row000 = mysql_fetch_array($buyer)) {
    $buyer_photo = $row000['photo'];
    $buyer_name = $row000['name'] . '&nbsp;' . $row000['sur_name'];
    if ($row000['sex'] == 'M') {
        $buyer_type = 'Father';
    } else {
        $buyer_type = 'Mother';
    }
}
/*
 * child data
 */
$childp = mysql_query("select * from baby_child_profile_detail where bid='" . $_COOKIE['bid'] . "' ") or die(mysql_error());
while ($row00 = mysql_fetch_array($childp)) {
    $child_photo = $row00['photo'];
    $child_name = $row00['name'] . '&nbsp;' . $row00['sur_name'];
}
$buyer_photo_path = 'http://' . $_SERVER['HTTP_HOST'] . '/salusme/storage/profile_photo/';
$child_photo_path = 'http://' . $_SERVER['HTTP_HOST'] . '/salusbaby/storage/profile_photo/';
?>

<div id="header_small">
    <div class="color_white padding_20 float_right1" id="user_detail">
        <div>            

            <img alt="<?= $buyer_email ?>" title="<?= $buyer_type ?>" width="80px" height="80px" src="<?= $buyer_photo_path.$buyer_photo  ?>" style="margin-left: 91%;"  />
            <img alt="baby" title="child" width="60px" height="60px" src="<?= $child_photo_path . $child_photo ?>" style="margin-left: 89%;  margin-top: -50px; " />    
        </div>

        <div class="float_right header_name">
            <div style="font-size: 15px;font-weight: bold;"><a href="<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/salusbaby/user/view/'; ?>myaccount.php"><?= $buyer_name ?></a></div>
            <div style="font-size: 15px;font-weight: bold;"><?= $child_name ?></div>
            <div style="font-size: 15px;font-weight: bold;"><a href="<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/salusbaby/user/view/'; ?>myaccount.php" style="color: #FFF">My account</a></div>
            <!--                    <div>
                                    <select>
                                        <option>Select</option>
                                    </select>
                                </div>-->
        </div>
        <div class="clear"></div>
    </div>
</div>